﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MessageBroadcast
{
    public class ScientifiyDepart : IReceiveMessage
    {
        public bool isActive()
        {
            return true;
        }

        public void Receive(Project project)
        {
            if (project.ProjType == ProjTypeConst.Sci)
            {
                Console.WriteLine($"科研部门收到了创建项目{project.ProjCode}-{project.ProjName}的信息！");
            }
        }
    }

    public class Educate : IReceiveMessage
    {
        public bool isActive()
        {
            return true;
        }

        public void Receive(Project project)
        {
            if (project.ProjType == ProjTypeConst.Edu)
            {
                Console.WriteLine($"教育部门收到了创建项目{project.ProjCode}-{project.ProjName}的信息！");
            }
        }
    }
}